VMaxAClock
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Code Example<APPLET CODE=vmaxaclock.class WIDTH=60 HEIGHT=60> <param name="TZ" value="GMT"> <param name="AUTHOR" VALUE="Virtual_Max (http://come.to/vmax)"> <param name="KEY" VALUE="Free Version"> <param name="FGCOLOR" VALUE="FFFFFF"> <param name="BGCOLOR" VALUE="808099"> </APPLET> ParametersFGCOLOR, FGCOLORForeground and background colors, same as HTML colors in RRGGBB format, but without # hex radix. TZ [optional] Clock time zone abbreviation. If omited clock will show local client time. AUTHOR Obligatory parameter, must remains unchanged KEY Free users can use applet with KEY "Free Version". This will open new browser window linked to my site. If you want to get rid of this feature you must register. Terms of use.You are welcome to use this applet free with key "Free Version" for any purposes.Referencing this applet on any resource listings are greatly appreciated untill link to original applet home page provided. Redistributing or mirroring of applet class file, package or it's documentation is strictly prohibited. Instead, please provide link to this package original location at http://www.oocities.org/virtual_max/vmaxaclock/index.html The only exclusion of this rule is vmax.netfx.com server. Download and installationStep 1. Download package vmaxaclock.zipStep 2. Upload vmaxaclock.class file with FTP client to your server in binary mode into the same directory where your HTML will be located. Step 3. Open your HTML file with any text editor, find place where you want clock to appear, and copy sample code there. Step 4. Customize applet parameters. Step 5. [optional] register. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Scripting Example
// Function to get selected option value from select onChange handler.
// It first checks applet exists and than call applet setTZ(tzName)
<script>
function setTZ(sel){
clock=document.applets['vmaxaclock'];
if(clock==null) return;
var v = sel.selectedIndex;
if(v<0) return;
v=sel.options[v].value;
if(clock!=null) {
clock.setTZ(v);
}
}
</script>
Here is the same applet but with NAME="vmaxaclock" attribute
to get applet reference by name from setTZ() function
<APPLET NAME="vmaxaclock" CODE=vmaxaclock.class WIDTH=60 HEIGHT=60>
<param name="AUTHOR" VALUE="Virtual_Max (http://come.to/vmax)">
....more params skipped......
</APPLET>
And this is example of form with select, which use onChange handler to
pass selected timezone to applet via call to setTZ() function
<form onSubmit="return false;">
<select onChange="setTZ(this)">
<option value="" selected>Local Time
<option value="GMT">GMT 0:00
<option value="UTC">UTC 0:00
<option value="ECT">ECT 1:00
.. more options skipped...
<option value="CAT">CAT -1:00
</select>
</form>
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
© 2001, Virtual_Max (http://come.to/vmax) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||